import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    redirect:'/anniu1',
    path: '/',
    name: 'home',
    component: HomeView,
    children:[
      {
        path:'anniu1',
        component:()=>import('@/components/AnNiu1')
      },
      {
        path:'anniu2',
        component:()=>import('@/components/AnNiu2')
      },
      {
        path:'anniu3',
        component:()=>import('@/components/AnNiu3')
      },
    ]
  },
  {
    path:'/enroll',
    component:()=>import('@/components/EnRoll')
  },
  {
    path:'/login',
    component:()=>import('@/components/LoGin')
  },
  {
    path:'/search',
    component:()=>import('@/components/SearCh')
  },
  {
    path:'/user',
    component:()=>import('@/components/UsEr')
  },
  {
    path:'/article',
    name:'article',
    component:()=>import('@/components/ArTicle')
  }
]

const router = new VueRouter({
  routes
})

export default router
